$(function(){
layui.use(['form',"laydate"],function(){
		var form=layui.form;
		var laydate=layui.laydate;
		 form.render();
		 laydate.render({
		 	elem:"#birthday",
		 	type:"datetime"
		 });
		function find_roleName_list(){
			$.ajax({
				type:"get",
				url:"http://localhost:8080/ssmService/role/selectRoleName",
				async:true,
				"success":function(result){
					if(result.resultCode==0){
						build_roleName_List(result);
					}else{
						layer.msg(result.message,{
							icon:2,
							time:1000
						});
					}
					
				}
			});
		}
		function build_roleName_List(result){
			var roleNameList=result.data;
			$.each(roleNameList,function(index,item){
			   var roleCheckBox=$("<input type='checkbox' value='"+item.role_id+"' title='"+item.name+"'>");
				$(".roleList").append(roleCheckBox);
			});
			form.render();
		}
		find_roleName_list();
		});	
});  